<template>
	<view class="uiwu-videosss">
		<slot>
			<!-- #ifndef APP -->
			<live-player
				id="uiwu-live-player"
				:src="props.item[0]?.monitor_url"
				object-fit="contain"
				autoplay
				@error="error"
			/>
			<!-- #endif -->
			<!-- #ifdef APP-PLUS -->
			<video
				autoplay
				object-fit="contain"
				:play-strategy="2"
				:is-live="true"
				:src="props.item[0]?.monitor_url" 
				:controls="false" 
				:show-center-play-btn="false" 
				:show-fullscreen-btn="false" 
				:show-play-btn="false"
				:enable-progress-gesture="false"
				:show-loading="false"
			/>
			<!-- #endif -->
		</slot>
	</view>
</template>

<script setup lang="ts">
	const props = defineProps({
		item:{
			default:[],
			type:[Array,Object]
		}
	})
	const error = (e) => {
		console.log(e);
	}
	
</script>

<style lang="scss" scoped>
	.uiwu-videosss{
		width: 100%;
		height: 100%;
		video{
			width: 100%;
			height: 99%;
			border-radius: 24rpx;
		}
		live-player{
			width: 100%;
			height: 100%;
			border-radius: 24rpx;
		}
	}
</style>